package ArrayQueue;

public class Main {
    public static void main(String[] args) {
        CircularArrayQueue arrayQueue = new CircularArrayQueue(10);
        arrayQueue.inQueue(10);
        arrayQueue.inQueue(20);
        arrayQueue.inQueue(30);
        arrayQueue.print();
        //数据出队
        System.out.println("队列出队2次");
        System.out.printf("%d \t %d \n", arrayQueue.outQueue(), arrayQueue.outQueue());
        arrayQueue.print();
        arrayQueue.inQueue(40);
        arrayQueue.inQueue(50);
        arrayQueue.inQueue(60);
        arrayQueue.inQueue(70);
        arrayQueue.inQueue(80);
        arrayQueue.inQueue(90);
        arrayQueue.inQueue(100);
        arrayQueue.print();
        arrayQueue.inQueue(110);
        arrayQueue.inQueue(120);
        //数据量超过最大范围
        arrayQueue.inQueue(130);
        arrayQueue.print();
    }
}
